import { GameObject } from "./GameObject";
import { GamePiece } from "./GamePiece";

export class Player extends GameObject{ //目前没有用到，都是后端去判断，并不是两条蛇需要去更新画图的逻辑
    constructor(info,gamemap){
        super();
        this.id = info.id;
        this.col = info.col; //当前落子的位置
        this.row = info.row;
        this.gamemap = gamemap;
        this.currentPlayer = 1; //1表示黑棋 ，2表示白棋
        this.pieces = [];
    }
    start(){

    }
    setPlayer(currentPlayer){ //这里的话可以变成画赢的玩家的棋子的阴影，先留着
        this.currentPlayer = currentPlayer;
    }
    update(){
        this.render();
    }
    render(){
        this.pieces.push(new GamePiece(this.col,this.row,this.gamemap,this.currentPlayer));
    }
}